#!/bin/sh

# Part of Zombie Navigator
# Copyright © 2015  Zombie Navigator Developers

dir="`dirname "$0"`"
dir="`cd "$dir";pwd`"
cd "$dir/src"

package="`basename "$dir"`"


if ! which git >/dev/null 2>&1 ; then
	echo "Please install git somewhere in PATH" >&2
	exit 1
fi

tree="$1"
[ ! "$tree" ] && tree="master"

if ! which 7z >/dev/null 2>&1 ; then
	git archive --prefix="$package"_"$tree"/ "$tree" | gzip -9
else
	git archive --prefix="$package"_"$tree"/ "$tree" | 7z a dummy -tgzip -si -so -mx=9
fi


# vim: ts=4 noet ai

